/**
 * Created by zhangsong on 2019/10/7.
 */

const StaffApplication = {
  // 列表
  list: 'StaffApplicationList',
  // 详情
  detail: 'StaffApplicationDetail',
  // 新增
  add: 'StaffApplicationAdd',
  // 修改
  modify: 'StaffApplicationModify',
  // 删除
  remove: 'StaffApplicationRemove',
  // 预览
  preview: 'StaffApplicationPreview',
  // 打印
  printing: 'StaffApplicationPrinting',
  // 审批
  approval: 'StaffApplicationApproval',
  // 註銷
  cancellation: 'ContractorApplicationCancellation',
  // 修改ic
  modifyic: 'StaffApplicationModifyic',
  cancel: 'StaffApplicationCancel',
};

const ContractorApplication = {
  // 列表
  list: 'ContractorApplicationList',
  // 详情
  detail: 'ContractorApplicationDetail',
  // 新增
  add: 'ContractorApplicationAdd',
  // 修改
  modify: 'ContractorApplicationModify',
  // 删除
  remove: 'ContractorApplicationRemove',
  // 预览
  preview: 'ContractorApplicationPreview',
  // 打印
  printing: 'ContractorApplicationPrinting',
  // 审批
  approval: 'ContractorApplicationApproval',
  // review
  review: 'ContractorApplicationReview',
  // 註銷
  cancellation: 'ContractorApplicationCancellation',
  // 修改ic
  modifyic: 'ContractorApplicationModifyic',
  sendemail: 'ContractorApplicationSendEmail',
  cancel: 'ContractorApplicationCancel',

};

const VehiclesApplication = {
  // 列表
  list: 'VehiclesApplicationList',
  // 详情
  detail: 'VehiclesApplicationDetail',
  // 新增
  add: 'VehiclesApplicationAdd',
  // 修改
  modify: 'VehiclesApplicationModify',
  // 删除
  remove: 'VehiclesApplicationRemove',
  // 预览
  preview: 'VehiclesApplicationPreview',
  // 打印
  printing: 'VehiclesApplicationPrinting',
  // 审批
  approval: 'VehiclesApplicationApproval',
};

const TemporaryApplication = {
  // 列表
  list: 'TemporaryApplicationList',
  // 详情
  detail: 'TemporaryApplicationDetail',
  // 新增
  add: 'TemporaryApplicationAdd',
  // 修改
  modify: 'TemporaryApplicationModify',
  // 删除
  remove: 'TemporaryApplicationRemove',
  // 预览
  preview: 'TemporaryApplicationPreview',
  // 打印
  printing: 'TemporaryApplicationPrinting',
  // 审批
  approval: 'TemporaryApplicationApproval',
  // 註銷
  cancellation: 'TemporaryApplicationCancellation',
};

const VaccineApplication = {
  // 列表
  setting: 'VaccineApplicationList',
  partbtime: 'VaccineApplicationTime',
};

const AlarmEmailApplication = {
  // 列表
  list: 'AlarmEmailApplicationList',
};

export const Role = {
  // 超级管理员,拥有全部权限
  100: [
    ...Object.values(StaffApplication),
    // ...Object.values(ContractorApplication),
    ContractorApplication.list,
    ContractorApplication.detail,
    ContractorApplication.preview,
    ContractorApplication.printing,
    ContractorApplication.add,
    ContractorApplication.modify,
    ContractorApplication.remove,
    ContractorApplication.review,
    ContractorApplication.cancellation,
    ContractorApplication.modifyic,
    ContractorApplication.sendemail,
    ContractorApplication.cancel,
    ContractorApplication.approval,
    ...Object.values(VehiclesApplication),
    ...Object.values(VaccineApplication),
    ...Object.values(AlarmEmailApplication),
    ...Object.values(TemporaryApplication),
  ],
  111: [
    // ...Object.values(StaffApplication),
    // ...Object.values(ContractorApplication),

    StaffApplication.add,
    StaffApplication.approval,
    StaffApplication.cancellation,
    StaffApplication.detail,
    StaffApplication.list,
    StaffApplication.modify,
    StaffApplication.modifyic,
    StaffApplication.preview,
    StaffApplication.printing,
    StaffApplication.remove,

    ContractorApplication.list,
    ContractorApplication.detail,
    ContractorApplication.preview,
    ContractorApplication.printing,
    ContractorApplication.add,
    ContractorApplication.modify,
    ContractorApplication.remove,
    ContractorApplication.approval,
    ContractorApplication.cancellation,
    ContractorApplication.modifyic,
    ContractorApplication.sendemail,
    ...Object.values(VehiclesApplication),
    ...Object.values(VaccineApplication),
    ...Object.values(AlarmEmailApplication),
    ...Object.values(TemporaryApplication),
  ],
  // 查询人员.可以查询列表页面,详情页面,可以预览打印
  101: [
    StaffApplication.list,
    StaffApplication.detail,
    StaffApplication.preview,
    StaffApplication.printing,

    ContractorApplication.list,
    ContractorApplication.detail,
    ContractorApplication.preview,
    ContractorApplication.printing,
    ContractorApplication.modify,

    VehiclesApplication.list,
    VehiclesApplication.detail,
    VehiclesApplication.preview,
    VehiclesApplication.printing,

    VaccineApplication.setting,

    AlarmEmailApplication.list,

    ...Object.values(TemporaryApplication),
  ],
  // 登记人员.可以查询列表页面,详情页面,可以新增修改删除
  102: [
    StaffApplication.list,
    StaffApplication.detail,
    StaffApplication.preview,
    StaffApplication.printing,
    StaffApplication.add,
    StaffApplication.modify,
    StaffApplication.remove,

    ContractorApplication.list,
    ContractorApplication.detail,
    ContractorApplication.preview,
    ContractorApplication.printing,
    ContractorApplication.add,
    ContractorApplication.modify,
    ContractorApplication.remove,

    VehiclesApplication.list,
    VehiclesApplication.detail,
    VehiclesApplication.preview,
    VehiclesApplication.printing,
    VehiclesApplication.add,
    VehiclesApplication.modify,
    VehiclesApplication.remove,

    VaccineApplication.setting,

    AlarmEmailApplication.list,
    ...Object.values(TemporaryApplication),
  ],
  // 审批人员.可以查询列表页面,详情页面,可以审批,可以预览
  103: [
    StaffApplication.list,
    StaffApplication.detail,
    StaffApplication.preview,
    StaffApplication.printing,
    StaffApplication.modify,
    StaffApplication.approval,

    ContractorApplication.list,
    ContractorApplication.detail,
    ContractorApplication.preview,
    ContractorApplication.printing,
    ContractorApplication.modify,
    ContractorApplication.approval,

    VehiclesApplication.list,
    VehiclesApplication.detail,
    VehiclesApplication.preview,
    VehiclesApplication.printing,
    VehiclesApplication.modify,
    VehiclesApplication.approval,

    VaccineApplication.setting,

    AlarmEmailApplication.list,

    ...Object.values(TemporaryApplication),
  ],

  110: [
    ContractorApplication.list,
    ContractorApplication.detail,
    ContractorApplication.add,
    // ContractorApplication.preview,
    // ContractorApplication.printing,
    // ContractorApplication.remove,
    ContractorApplication.modify,
    // ContractorApplication.cancellation,

    TemporaryApplication.list,
    TemporaryApplication.detail,
    TemporaryApplication.add,
    TemporaryApplication.preview,
    TemporaryApplication.printing,
    TemporaryApplication.remove,
    TemporaryApplication.modify,
    TemporaryApplication.cancellation,
    // ContractorApplication.approval,
  ],


};

export default {
  StaffApplication,
  ContractorApplication,
  VehiclesApplication,
  TemporaryApplication,
  VaccineApplication,
  AlarmEmailApplication,
};
